package com.codecrane.core.mybatis;

/**
 * Created by 752322896 on 2019/3/23.
 */

public  class DBContextHolder {
    private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();
    public synchronized static void setDbType(String dbType) {
        contextHolder.set(dbType);
    }
    public static String getDbType() {
        return ((String) contextHolder.get());
    }
    public synchronized static void clearDbType() {
        contextHolder.remove();
    }
}
